#pragma once
#ifndef Application_H
#define Application_H

#include <ClanLib/core.h>
#include <ClanLib/display.h>
#include <ClanLib/gl.h>
#include <ClanLib/application.h>

#include "SpaceShip.h"




class Application {
private:


	Application(void);
	static Application* m_instance;
	CL_DisplayWindow* m_window;
	CL_ConsoleWindow* m_console;
	CL_InputDevice* m_keyboard;
	CL_InputDevice* m_mouse;

	bool quit;
	CL_Slot slot_key_up,slot_quit,slot_mouse_up, slot_key_down;
	void on_key_up(const CL_InputEvent& event, const CL_InputState& state);
	void on_mouse_up(const CL_InputEvent &key, const CL_InputState &state);
	void on_key_down(const CL_InputEvent& event, const CL_InputState& state);
	void on_window_close();

	SpaceShip spaceShip;
public: 
	static Application& Instance();
	void Start(void);
	~Application(void);
	CL_ConsoleWindow&  console( void ) { return *m_console; }
	CL_DisplayWindow& window( void ) { return *m_window; }
    CL_InputDevice& keyboard( void ) { return *m_keyboard; }
	CL_InputDevice& mouse( void ) { return *m_mouse; }

	

	
	
};

#endif